<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/xhtml;charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=9" http-equiv="X-UA-Compatible"/>
<meta content="Doxygen 1.8.13" name="generator"/>
<title>OpenCV: cv::dnn::SegmentationModel Class Reference</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script src="../../jquery.js" type="text/javascript"></script>
<script src="../../dynsections.js" type="text/javascript"></script>
<script src="../../tutorial-utils.js" type="text/javascript"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script src="../../search/searchdata.js" type="text/javascript"></script>
<script src="../../search/search.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js" type="text/javascript"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellpadding="0" cellspacing="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
    <span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script src="../../menudata.js" type="text/javascript"></script>
<script src="../../menu.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow" onkeydown="return searchBox.OnSearchSelectKey(event)" onmouseout="return searchBox.OnSearchSelectHide()" onmouseover="return searchBox.OnSearchSelectShow()">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe frameborder="0" id="MSearchResults" name="MSearchResults" src="javascript:void(0)">
</iframe>
</div>
<div class="navpath" id="nav-path">
  <ul>
<li class="navelem"><a class="el" href="../../d2/d75/namespacecv.html">cv</a></li><li class="navelem"><a class="el" href="../../df/d57/namespacecv_1_1dnn.html">dnn</a></li><li class="navelem"><a class="el" href="../../da/dce/classcv_1_1dnn_1_1SegmentationModel.html">SegmentationModel</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="../../d8/dde/classcv_1_1dnn_1_1SegmentationModel-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">cv::dnn::SegmentationModel Class Reference<div class="ingroups"><a class="el" href="../../d6/d0f/group__dnn.html">Deep Neural Network module</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<p>This class represents high-level API for segmentation models.  
 <a href="../../da/dce/classcv_1_1dnn_1_1SegmentationModel.html#details">More...</a></p>
<p><code>#include &lt;opencv2/dnn/dnn.hpp&gt;</code></p>
<div class="dynheader">
Inheritance diagram for cv::dnn::SegmentationModel:</div>
<div class="dyncontent">
 <div class="center">
  <img alt="" src="../../da/dce/classcv_1_1dnn_1_1SegmentationModel.png" usemap="#cv::dnn::SegmentationModel_map"/>
  <map id="cv::dnn::SegmentationModel_map" name="cv::dnn::SegmentationModel_map">
<area alt="cv::dnn::Model" coords="0,0,169,24" href="../../d3/df0/classcv_1_1dnn_1_1Model.html" shape="rect" title="This class is presented high-level API for neural networks. "/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ae4f2c95310ea7213bb6b889160e21fd7"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dce/classcv_1_1dnn_1_1SegmentationModel.html#ae4f2c95310ea7213bb6b889160e21fd7">SegmentationModel</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;model, const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;config="")</td></tr>
<tr class="memdesc:ae4f2c95310ea7213bb6b889160e21fd7"><td class="mdescLeft"> </td><td class="mdescRight">Create segmentation model from network represented in one of the supported formats. An order of <code>model</code> and <code>config</code> arguments does not matter.  <a href="#ae4f2c95310ea7213bb6b889160e21fd7">More...</a><br/></td></tr>
<tr class="separator:ae4f2c95310ea7213bb6b889160e21fd7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a972b1ee7ce7694b2fe3b6db3bf6f6a29"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dce/classcv_1_1dnn_1_1SegmentationModel.html#a972b1ee7ce7694b2fe3b6db3bf6f6a29">SegmentationModel</a> (const <a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> &amp;network)</td></tr>
<tr class="memdesc:a972b1ee7ce7694b2fe3b6db3bf6f6a29"><td class="mdescLeft"> </td><td class="mdescRight">Create model from deep learning network.  <a href="#a972b1ee7ce7694b2fe3b6db3bf6f6a29">More...</a><br/></td></tr>
<tr class="separator:a972b1ee7ce7694b2fe3b6db3bf6f6a29"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab5542c90d35cfbc3fa32095aa77b2a95"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dce/classcv_1_1dnn_1_1SegmentationModel.html#ab5542c90d35cfbc3fa32095aa77b2a95">segment</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> frame, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> mask)</td></tr>
<tr class="memdesc:ab5542c90d35cfbc3fa32095aa77b2a95"><td class="mdescLeft"> </td><td class="mdescRight">Given the <code>input</code> frame, create input blob, run net.  <a href="#ab5542c90d35cfbc3fa32095aa77b2a95">More...</a><br/></td></tr>
<tr class="separator:ab5542c90d35cfbc3fa32095aa77b2a95"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_methods_classcv_1_1dnn_1_1Model"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classcv_1_1dnn_1_1Model')"><img alt="-" src="../../closed.png"/> Public Member Functions inherited from <a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html">cv::dnn::Model</a></td></tr>
<tr class="memitem:a5ccfd862a641a6b48472a88d821f33bf inherit pub_methods_classcv_1_1dnn_1_1Model"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html#a5ccfd862a641a6b48472a88d821f33bf">Model</a> ()</td></tr>
<tr class="separator:a5ccfd862a641a6b48472a88d821f33bf inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa1c0d898fe9658d9547b5a1996457243 inherit pub_methods_classcv_1_1dnn_1_1Model"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html#aa1c0d898fe9658d9547b5a1996457243">Model</a> (const <a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html">Model</a> &amp;)=default</td></tr>
<tr class="separator:aa1c0d898fe9658d9547b5a1996457243 inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a432f18b1632acd8c1a11736a051d647b inherit pub_methods_classcv_1_1dnn_1_1Model"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html#a432f18b1632acd8c1a11736a051d647b">Model</a> (<a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html">Model</a> &amp;&amp;)=default</td></tr>
<tr class="separator:a432f18b1632acd8c1a11736a051d647b inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7ad13e315a170b9c5e3ca212a1a0a909 inherit pub_methods_classcv_1_1dnn_1_1Model"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html#a7ad13e315a170b9c5e3ca212a1a0a909">Model</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;model, const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;config="")</td></tr>
<tr class="memdesc:a7ad13e315a170b9c5e3ca212a1a0a909 inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="mdescLeft"> </td><td class="mdescRight">Create model from deep learning network represented in one of the supported formats. An order of <code>model</code> and <code>config</code> arguments does not matter.  <a href="../../d3/df0/classcv_1_1dnn_1_1Model.html#a7ad13e315a170b9c5e3ca212a1a0a909">More...</a><br/></td></tr>
<tr class="separator:a7ad13e315a170b9c5e3ca212a1a0a909 inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aeda26984960f2985f0071e33a51b34d3 inherit pub_methods_classcv_1_1dnn_1_1Model"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html#aeda26984960f2985f0071e33a51b34d3">Model</a> (const <a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> &amp;network)</td></tr>
<tr class="memdesc:aeda26984960f2985f0071e33a51b34d3 inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="mdescLeft"> </td><td class="mdescRight">Create model from deep learning network.  <a href="../../d3/df0/classcv_1_1dnn_1_1Model.html#aeda26984960f2985f0071e33a51b34d3">More...</a><br/></td></tr>
<tr class="separator:aeda26984960f2985f0071e33a51b34d3 inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa4191ee5eabbfda156acdf1d69745839 inherit pub_methods_classcv_1_1dnn_1_1Model"><td align="right" class="memItemLeft" valign="top">Impl * </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html#aa4191ee5eabbfda156acdf1d69745839">getImpl</a> () const</td></tr>
<tr class="separator:aa4191ee5eabbfda156acdf1d69745839 inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aab7499a3e8a48fb13208f605ea7db767 inherit pub_methods_classcv_1_1dnn_1_1Model"><td align="right" class="memItemLeft" valign="top">Impl &amp; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html#aab7499a3e8a48fb13208f605ea7db767">getImplRef</a> () const</td></tr>
<tr class="separator:aab7499a3e8a48fb13208f605ea7db767 inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae355aa23957c8a3830a1d5c4e2ae2a94 inherit pub_methods_classcv_1_1dnn_1_1Model"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> &amp; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html#ae355aa23957c8a3830a1d5c4e2ae2a94">getNetwork_</a> () const</td></tr>
<tr class="separator:ae355aa23957c8a3830a1d5c4e2ae2a94 inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad7cda0e4ef2d06a1efeb34ecf1047305 inherit pub_methods_classcv_1_1dnn_1_1Model"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> &amp; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html#ad7cda0e4ef2d06a1efeb34ecf1047305">getNetwork_</a> ()</td></tr>
<tr class="separator:ad7cda0e4ef2d06a1efeb34ecf1047305 inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aee25d25ba491906a44580d4ac7611467 inherit pub_methods_classcv_1_1dnn_1_1Model"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html#aee25d25ba491906a44580d4ac7611467">operator Net &amp;</a> () const</td></tr>
<tr class="separator:aee25d25ba491906a44580d4ac7611467 inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a252e1ebfe0a023a463b703196d229e56 inherit pub_methods_classcv_1_1dnn_1_1Model"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html">Model</a> &amp; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html#a252e1ebfe0a023a463b703196d229e56">operator=</a> (const <a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html">Model</a> &amp;)=default</td></tr>
<tr class="separator:a252e1ebfe0a023a463b703196d229e56 inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2cfd496f91fb6e39346d1c5c88798432 inherit pub_methods_classcv_1_1dnn_1_1Model"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html">Model</a> &amp; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html#a2cfd496f91fb6e39346d1c5c88798432">operator=</a> (<a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html">Model</a> &amp;&amp;)=default</td></tr>
<tr class="separator:a2cfd496f91fb6e39346d1c5c88798432 inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7af24145b0fcfd4581793e7c34225156 inherit pub_methods_classcv_1_1dnn_1_1Model"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html#a7af24145b0fcfd4581793e7c34225156">predict</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> frame, <a class="el" href="../../dc/d84/group__core__basic.html#ga889a09549b98223016170d9b613715de">OutputArrayOfArrays</a> outs) const</td></tr>
<tr class="memdesc:a7af24145b0fcfd4581793e7c34225156 inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="mdescLeft"> </td><td class="mdescRight">Given the <code>input</code> frame, create input blob, run net and return the output <code>blobs</code>.  <a href="../../d3/df0/classcv_1_1dnn_1_1Model.html#a7af24145b0fcfd4581793e7c34225156">More...</a><br/></td></tr>
<tr class="separator:a7af24145b0fcfd4581793e7c34225156 inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af441526f30e98e84ebcd568aac7edc99 inherit pub_methods_classcv_1_1dnn_1_1Model"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html">Model</a> &amp; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html#af441526f30e98e84ebcd568aac7edc99">setInputCrop</a> (bool crop)</td></tr>
<tr class="memdesc:af441526f30e98e84ebcd568aac7edc99 inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="mdescLeft"> </td><td class="mdescRight">Set flag crop for frame.  <a href="../../d3/df0/classcv_1_1dnn_1_1Model.html#af441526f30e98e84ebcd568aac7edc99">More...</a><br/></td></tr>
<tr class="separator:af441526f30e98e84ebcd568aac7edc99 inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abe381973a9b364eeade4b1cc30561cc8 inherit pub_methods_classcv_1_1dnn_1_1Model"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html">Model</a> &amp; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html#abe381973a9b364eeade4b1cc30561cc8">setInputMean</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp;<a class="el" href="../../d2/de8/group__core__array.html#ga191389f8a0e58180bb13a727782cd461">mean</a>)</td></tr>
<tr class="memdesc:abe381973a9b364eeade4b1cc30561cc8 inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="mdescLeft"> </td><td class="mdescRight">Set mean value for frame.  <a href="../../d3/df0/classcv_1_1dnn_1_1Model.html#abe381973a9b364eeade4b1cc30561cc8">More...</a><br/></td></tr>
<tr class="separator:abe381973a9b364eeade4b1cc30561cc8 inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3af51e4292f8cbce196df311254826c2 inherit pub_methods_classcv_1_1dnn_1_1Model"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html#a3af51e4292f8cbce196df311254826c2">setInputParams</a> (double scale=1.0, const <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> &amp;size=<a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>(), const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp;<a class="el" href="../../d2/de8/group__core__array.html#ga191389f8a0e58180bb13a727782cd461">mean</a>=<a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a>(), bool swapRB=false, bool crop=false)</td></tr>
<tr class="memdesc:a3af51e4292f8cbce196df311254826c2 inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="mdescLeft"> </td><td class="mdescRight">Set preprocessing parameters for frame.  <a href="../../d3/df0/classcv_1_1dnn_1_1Model.html#a3af51e4292f8cbce196df311254826c2">More...</a><br/></td></tr>
<tr class="separator:a3af51e4292f8cbce196df311254826c2 inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a33c970dd73ba040819b08914bd83cc20 inherit pub_methods_classcv_1_1dnn_1_1Model"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html">Model</a> &amp; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html#a33c970dd73ba040819b08914bd83cc20">setInputScale</a> (double scale)</td></tr>
<tr class="memdesc:a33c970dd73ba040819b08914bd83cc20 inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="mdescLeft"> </td><td class="mdescRight">Set scalefactor value for frame.  <a href="../../d3/df0/classcv_1_1dnn_1_1Model.html#a33c970dd73ba040819b08914bd83cc20">More...</a><br/></td></tr>
<tr class="separator:a33c970dd73ba040819b08914bd83cc20 inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8079e4b591dc8b04827d812600cf33e6 inherit pub_methods_classcv_1_1dnn_1_1Model"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html">Model</a> &amp; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html#a8079e4b591dc8b04827d812600cf33e6">setInputSize</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> &amp;size)</td></tr>
<tr class="memdesc:a8079e4b591dc8b04827d812600cf33e6 inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="mdescLeft"> </td><td class="mdescRight">Set input size for frame.  <a href="../../d3/df0/classcv_1_1dnn_1_1Model.html#a8079e4b591dc8b04827d812600cf33e6">More...</a><br/></td></tr>
<tr class="separator:a8079e4b591dc8b04827d812600cf33e6 inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac4dbf2e0c9a06ca5a973c42c7988b79e inherit pub_methods_classcv_1_1dnn_1_1Model"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html">Model</a> &amp; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html#ac4dbf2e0c9a06ca5a973c42c7988b79e">setInputSize</a> (int width, int height)</td></tr>
<tr class="separator:ac4dbf2e0c9a06ca5a973c42c7988b79e inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a796ef4ba475bf705dad3cc8a5dac058d inherit pub_methods_classcv_1_1dnn_1_1Model"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html">Model</a> &amp; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html#a796ef4ba475bf705dad3cc8a5dac058d">setInputSwapRB</a> (bool swapRB)</td></tr>
<tr class="memdesc:a796ef4ba475bf705dad3cc8a5dac058d inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="mdescLeft"> </td><td class="mdescRight">Set flag swapRB for frame.  <a href="../../d3/df0/classcv_1_1dnn_1_1Model.html#a796ef4ba475bf705dad3cc8a5dac058d">More...</a><br/></td></tr>
<tr class="separator:a796ef4ba475bf705dad3cc8a5dac058d inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af5df287c34870b50b0828553dbebfab7 inherit pub_methods_classcv_1_1dnn_1_1Model"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html">Model</a> &amp; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html#af5df287c34870b50b0828553dbebfab7">setPreferableBackend</a> (<a class="el" href="../../d6/d0f/group__dnn.html#ga186f7d9bfacac8b0ff2e26e2eab02625">dnn::Backend</a> backendId)</td></tr>
<tr class="separator:af5df287c34870b50b0828553dbebfab7 inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a204c2d0c9ff0a67403d6ae28b91f738b inherit pub_methods_classcv_1_1dnn_1_1Model"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html">Model</a> &amp; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html#a204c2d0c9ff0a67403d6ae28b91f738b">setPreferableTarget</a> (<a class="el" href="../../d6/d0f/group__dnn.html#ga709af7692ba29788182cf573531b0ff5">dnn::Target</a> targetId)</td></tr>
<tr class="separator:a204c2d0c9ff0a67403d6ae28b91f738b inherit pub_methods_classcv_1_1dnn_1_1Model"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pro_attribs_classcv_1_1dnn_1_1Model"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classcv_1_1dnn_1_1Model')"><img alt="-" src="../../closed.png"/> Protected Attributes inherited from <a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html">cv::dnn::Model</a></td></tr>
<tr class="memitem:ac85bd692412a11f32f2041d7eedbc809 inherit pro_attribs_classcv_1_1dnn_1_1Model"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; Impl &gt; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html#ac85bd692412a11f32f2041d7eedbc809">impl</a></td></tr>
<tr class="separator:ac85bd692412a11f32f2041d7eedbc809 inherit pro_attribs_classcv_1_1dnn_1_1Model"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a id="details" name="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>This class represents high-level API for segmentation models. </p>
<p><a class="el" href="../../da/dce/classcv_1_1dnn_1_1SegmentationModel.html" title="This class represents high-level API for segmentation models. ">SegmentationModel</a> allows to set params for preprocessing input image. <a class="el" href="../../da/dce/classcv_1_1dnn_1_1SegmentationModel.html" title="This class represents high-level API for segmentation models. ">SegmentationModel</a> creates net from file with trained weights and config, sets preprocessing input, runs forward pass and returns the class prediction for each pixel. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ae4f2c95310ea7213bb6b889160e21fd7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae4f2c95310ea7213bb6b889160e21fd7">◆ </a></span>SegmentationModel() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::dnn::SegmentationModel::SegmentationModel </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>model</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>config</em> = <code>""</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>&lt;dnn_SegmentationModel object&gt;</td><td>=</td><td>cv.dnn_SegmentationModel(</td><td class="paramname">model[, config]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>&lt;dnn_SegmentationModel object&gt;</td><td>=</td><td>cv.dnn_SegmentationModel(</td><td class="paramname">network</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Create segmentation model from network represented in one of the supported formats. An order of <code>model</code> and <code>config</code> arguments does not matter. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">model</td><td>Binary file contains trained weights. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">config</td><td>Text file contains network configuration. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="a972b1ee7ce7694b2fe3b6db3bf6f6a29"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a972b1ee7ce7694b2fe3b6db3bf6f6a29">◆ </a></span>SegmentationModel() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::dnn::SegmentationModel::SegmentationModel </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> &amp; </td>
          <td class="paramname"><em>network</em></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>&lt;dnn_SegmentationModel object&gt;</td><td>=</td><td>cv.dnn_SegmentationModel(</td><td class="paramname">model[, config]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>&lt;dnn_SegmentationModel object&gt;</td><td>=</td><td>cv.dnn_SegmentationModel(</td><td class="paramname">network</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Create model from deep learning network. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">network</td><td><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html" title="This class allows to create and manipulate comprehensive artificial neural networks. ">Net</a> object. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ab5542c90d35cfbc3fa32095aa77b2a95"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab5542c90d35cfbc3fa32095aa77b2a95">◆ </a></span>segment()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::dnn::SegmentationModel::segment </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>frame</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>mask</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>mask</td><td>=</td><td>cv.dnn_SegmentationModel.segment(</td><td class="paramname">frame[, mask]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Given the <code>input</code> frame, create input blob, run net. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">frame</td><td>The input image. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">mask</td><td>Allocated class prediction for each pixel </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>opencv2/dnn/<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">dnn.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:47 for OpenCV by  <a href="http://www.doxygen.org/index.html">
<img alt="doxygen" class="footer" src="../../doxygen.png"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
